﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace LAPI.Web.Controllers.Errores
{
    /// <summary>
    /// Controlador para /Errors/
    /// </summary>
    public class ErrorsController : Controller
    {
        /// <summary>
        /// GET: /Errors/General
        /// </summary>
        /// <param name="exception">Excepción lanzada</param>
        /// <returns>View CustomError.cshtml</returns>
        public ActionResult General(Exception exception)
        {
            ViewData["Error"] = exception;
            return View("CustomError");
        }

        /// <summary>
        /// GET: /Errors/Http404
        /// </summary>
        /// <returns>View CustomError.cshtml</returns>
        public ActionResult Http404()
        {
            ViewData["Error"] = "Página no encontrada.";
            return View("CustomError");
        }

        /// <summary>
        /// GET: /Errors/Http403
        /// </summary>
        /// <returns>View CustomError.cshtml</returns>
        public ActionResult Http403()
        {
            ViewData["Error"] = "Página no encontrada.";
            return View("CustomError");
        }
    }
}
